﻿' LibWowArmory
' by Ronald M. Clifford (roncli@roncli.com)
'
' This source code is released under the GNU Library General Public License (LGPL) Version 2.1.

Imports System.Collections.ObjectModel

Namespace roncliProductions.LibWowArmory.Dungeon

    ''' <summary>
    ''' A class that encapsulates a single dungeon returned from the Armory
    ''' </summary>
    ''' <remarks></remarks>
    Public Class Dungeon

        Private intPartySize As Integer
        Private bBosses As Collection(Of Boss)

        ''' <summary>
        ''' Determines if the dungeon has an heroic version
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property HasHeroic As Boolean

        ''' <summary>
        ''' The dungeon's identification number
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property DungeonID As Integer

        ''' <summary>
        ''' The dungeon's key
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property Key As String

        ''' <summary>
        ''' The maximum suggested level for the dungeon
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property LevelMax As Integer

        ''' <summary>
        ''' The minimum level required to enter the dungeon
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property LevelMin As Integer

        ''' <summary>
        ''' The name of the dungeon
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property Name As String

        ''' <summary>
        ''' The maximum party size allowed to enter the dungeon
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property PartySize As Integer
            Get
                Return If(DungeonID = 4820, 5, intPartySize) 'HACK: Reports the party size of Halls of Reflection correctly
            End Get
            Set(ByVal value As Integer)
                intPartySize = value
            End Set
        End Property

        ''' <summary>
        ''' Determines if the dungeon is a raid
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property Raid As Boolean

        ''' <summary>
        ''' The release of World of Warcraft the dungeon was introduced in
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property Release As Enums.ReleaseType

        ''' <summary>
        ''' The list of bosses for this dungeon
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public ReadOnly Property Bosses As Collection(Of Boss)
            Get
                Return bBosses
            End Get
        End Property

        ''' <summary>
        ''' Constructor to create a new dungeon object
        ''' </summary>
        ''' <param name="blnHasHeroic"></param>
        ''' <param name="intID"></param>
        ''' <param name="strKey"></param>
        ''' <param name="strName"></param>
        ''' <param name="rRelease"></param>
        ''' <param name="bBosses"></param>
        ''' <remarks></remarks>
        Public Sub New(ByVal blnHasHeroic As Boolean, ByVal intID As Integer, ByVal strKey As String, ByVal intLevelMax As Integer, ByVal intLevelMin As Integer, ByVal strName As String, ByVal intPartySize As Integer, ByVal blnRaid As Boolean, ByVal rRelease As Enums.ReleaseType, ByVal bBosses As Collection(Of Boss))
            HasHeroic = blnHasHeroic
            DungeonID = intID
            Key = strKey
            LevelMax = intLevelMax
            LevelMin = intLevelMin
            Name = strName
            Me.intPartySize = intPartySize
            Raid = blnRaid
            Release = rRelease
            Me.bBosses = bBosses
        End Sub

    End Class

End Namespace
